//
//  LYBaseViewController.swift
//  LYOnlineBanking
//
//  Created by 李永彬 on 2025/7/19.
//

import UIKit

class LYBaseViewController: UIViewController {
    
    var bgImage: UIImage? {
        didSet {
            self.bgImageV.image = bgImage
        }
    }
    
    var isHiddenCustomTabBar: Bool = true
    
    private var bgImageV = UIImageView()
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        bgImageV.image = UIImage(named: "background_base")
        bgImageV.isUserInteractionEnabled = true
        view.addSubview(bgImageV)
        bgImageV.snp.makeConstraints { make in
            make.edges.equalToSuperview()
        }
    }
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        if isHiddenCustomTabBar {
            setCustomTabBarHidden(true)
        }
        
    }
    
    override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        if isHiddenCustomTabBar {
            setCustomTabBarHidden(false)
        }
    }
    
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
